package com.itheima.CSM_preX.aaaController;

import com.itheima.CSM_preX.aabService.Serv.SetmealServ;
import com.itheima.common.entity.Result;
import com.itheima.pojo.VO.VOMOBsGet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/setmeal")
public class SetmealController {
    @Autowired
    private SetmealServ setmealServ;


    @PostMapping("/getSetmeal")
    public Result getSetmeal(){
        List<VOMOBsGet> kks = setmealServ.getSetmeal();
        return new Result(true,"",kks);
    }
    @PostMapping("/findById")
    public Result findById(Integer id){
        VOMOBsGet vo =  setmealServ.findById(id);
        return new Result(true,"",vo);
    }


}
